package com.example.nirvana.springframework8.beans.factory.config;

import com.example.nirvana.springframework8.beans.PropertyValues;
import lombok.Data;

/**
 * 定义 Bean 实例信息
 */
@Data
public class BeanDefinition {
    private Class beanClass;

    private PropertyValues propertyValues;

    private String initMethodName;

    private String destroyMethodName;

    public BeanDefinition(Class beanClass) {
        this(beanClass, null);
    }

    public BeanDefinition(Class beanClass, PropertyValues propertyValues) {
        this.beanClass = beanClass;
        this.propertyValues = propertyValues != null ? propertyValues : new PropertyValues();
    }
}
